home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-03-06 | 4.1 KB | 131 lines | [TEXT/MMCC] |
- //---------------------------------------------------------------------
- //---------------------------------------------------------------------
- //
- // Horrible Rickety Shell, by Dave Johnson
- //
- // © Copyright 1985 - 1995 Anyone Who Wants It,
- // All Rights Energetically Hurled as far away from me as possible.
- // Use at your own (considerable) risk.
-
- // Menu IDs and item numbers
- #define kAppleMenuID 128
- #define iAbout 1
-
- #define kFileMenuID 129
- #define iNew 1
- #define iOpen 2
- #define iClose 3
- #define iSave 4
- #define iSaveAs 5
- // -- divider -- 6
- #define iPageSetup 7
- #define iPrint 8
- #define iPrintOne 9
- // -- divider -- 10
- #define iQuit 11
-
- #define kEditMenuID 130
- #define iUndo 1
- #define iCut 3
- #define iCopy 4
- #define iPaste 5
- #define iClear 6
-
- // Indexes into global menu array
- #define kAppleMenu 0
- #define kFileMenu 1
- #define kEditMenu 2
-
- // Protoypes for routines that app must provide
-
- // Allow app a crack at raw event
- Boolean AppDoEvent(EventRecord *Event);
-
- // The start and the end
- Boolean AppInit(void);
- void AppCleanUp(void);
-
- // Events
- void AppActivate(WindowPtr wind, Boolean activate);
- void AppUpdate(WindowPtr wind);
- void AppDrawContent(WindowPtr wind);
- void AppIdle(EventRecord *event);
- void AppClick(Point thePt, WindowPtr wind, Boolean doubleClick, EventRecord *eventptr);
- void AppKeyDown(char key, EventRecord *eventptr);
- void AppGrowWindow(WindowPtr wind, short hSize, short vSize);
- void AppZoomWindow(WindowPtr wind, short zoomDir);
-
- // Menus in general
- void AppAdjustMenus(void);
- void AppMenu(short id, short item);
-
- // File Menu
- WindowPtr AppNew(short numJugglers, short numCounts);
- void AppOpen(void);
- void AppClose(WindowPtr wind);
- Boolean AppSave(WindowPtr wind);
- Boolean AppSaveAs(WindowPtr wind);
- void AppPageSetup(WindowPtr wind);
- OSErr AppPrint(WindowPtr wind);
- OSErr AppPrintOne(WindowPtr wind);
-
- // Edit Menu
- void AppUndo(void);
- void AppCut(void);
- OSErr AppCopy(void);
- void AppPaste(void);
- void AppClear(void);
-
- // GX specific
- Boolean SetUpGX(void);
- void TearDownGX(void);
-
-
- //-------------------------------------------------------
- // ShellUtils.c, part of the shell, but we may need 'em
- int abs(int i);
- long labs(long i);
- Boolean NewPixImage(PixMapHandle ThePix, Rect *TheRect, short dpth);
- Boolean NewBitMap(BitMap *TheMap, Rect *TheRect);
- void CenterRect(Rect *theRect, Point *thePt);
- Point Center(Rect *theRect);
- short NumToolboxTraps(void);
- TrapType GetTrapType(short theTrap);
- Boolean TrapAvailable(short theTrap);
- void pcat255(StringPtr d, StringPtr s);
- void pcat63(StringPtr d, StringPtr s);
- void AppendStr31(StringPtr d, StringPtr s);
- char* PStrCat(Str255 str1, Str255 str2, Boolean addSpace);
- void PStrCopy(Str255 src, Str255 dst);
- void AdjustScrollbars(WindowPtr wind, Boolean needsResize);
- void AdjustScrollValues(WindowPtr wind);
- pascal void ScrollActionProc(ControlHandle control, short part);
- Boolean AddStdScrollBars(WindowPtr wind);
- OSErr InitStdDoc(WindowPtr wind);
- Boolean CheckMachine(void);
- void CalcWindowStats(void);
-
- Boolean IsAppWindow(WindowPtr wind);
- void DoActivateUpdate(void);
- void ReadyWZoom(WindowPtr wind, short zoomDir, short maxH, short maxV);
- void CloseClip(WindowPtr wind);
- void DoErrorAlert(short stringID1, short error);
- short SaveChangesDlog(void);
- Boolean CloseAllDocs(void);
- void SetUpAndShowWindow(WindowPtr wind);
-
- // GX-specific routines, mostly stolen from GX Shells by Dave Hersey and Pete Alexander
- Boolean CheckQuickDrawGX (void);
- gxJob GetWindowGXJob(WindowPtr wind);
- gxShape GetWindowGXShape (WindowPtr wind);
- gxViewPort GetWindowGXPort(WindowPtr wind);
- OSErr AddWindowGXStuff(WindowPtr wind);
- void GetGXWindowBounds(WindowPtr wind, gxRectangle *gxRectPtr);
- void ResetGXClip(WindowPtr theWindow);
- void DoScroll(WindowPtr theWindow, short hScroll, short vScroll, Boolean draw);
- OSErr MyGXPrintingEventOverride (EventRecord *event, Boolean filterEvent);
- void SetUpGXEditMenuRec(gxEditMenuRecord *);
- OSErr DoGXFormatDialog(WindowPtr, gxDialogResult *);
- OSErr DoGXPrinting(WindowPtr);
- OSErr DoGXPrintOne(WindowPtr, gxShape page);
-